Optimal. Leaf size=88 \[ \frac {\left (a^2+b^2\right ) (a+b \tan (c+d x))^{1+n}}{b^3 d (1+n)}-\frac {2 a (a+b \tan (c+d x))^{2+n}}{b^3 d (2+n)}+\frac {(a+b \tan (c+d x))^{3+n}}{b^3 d (3+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3587, 711}
\begin {gather*} \frac {\left (a^2+b^2\right ) (a+b \tan (c+d x))^{n+1}}{b^3 d (n+1)}-\frac {2 a (a+b \tan (c+d x))^{n+2}}{b^3 d (n+2)}+\frac {(a+b \tan (c+d x))^{n+3}}{b^3 d (n+3)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 711
Rule 3587
Rubi steps
\begin {align*} \int \sec ^4(c+d x) (a+b \tan (c+d x))^n \, dx &=\frac {\text {Subst}\left (\int (a+x)^n \left (1+\frac {x^2}{b^2}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {\left (a^2+b^2\right ) (a+x)^n}{b^2}-\frac {2 a (a+x)^{1+n}}{b^2}+\frac {(a+x)^{2+n}}{b^2}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {\left (a^2+b^2\right ) (a+b \tan (c+d x))^{1+n}}{b^3 d (1+n)}-\frac {2 a (a+b \tan (c+d x))^{2+n}}{b^3 d (2+n)}+\frac {(a+b \tan (c+d x))^{3+n}}{b^3 d (3+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.67, size = 101, normalized size = 1.15 \begin {gather*} \frac {\sec ^2(c+d x) \left (a^2+4 b^2+4 b^2 n+b^2 n^2+\left (a^2+b^2 (2+n)\right ) \cos (2 (c+d x))-a b (1+n) \sin (2 (c+d x))\right ) (a+b \tan (c+d x))^{1+n}}{b^3 d (1+n) (2+n) (3+n)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.29, size = 0, normalized size = 0.00 \[\int \left (\sec ^{4}\left (d x +c \right )\right ) \left (a +b \tan \left (d x +c \right )\right )^{n}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 116, normalized size = 1.32 \begin {gather*} \frac {\frac {{\left (b \tan \left (d x + c\right ) + a\right )}^{n + 1}}{b {\left (n + 1\right )}} + \frac {{\left ({\left (n^{2} + 3 \, n + 2\right )} b^{3} \tan \left (d x + c\right )^{3} + {\left (n^{2} + n\right )} a b^{2} \tan \left (d x + c\right )^{2} - 2 \, a^{2} b n \tan \left (d x + c\right ) + 2 \, a^{3}\right )} {\left (b \tan \left (d x + c\right ) + a\right )}^{n}}{{\left (n^{3} + 6 \, n^{2} + 11 \, n + 6\right )} b^{3}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 176, normalized size = 2.00 \begin {gather*} \frac {{\left (2 \, {\left (2 \, a b^{2} n + a^{3} + 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} + {\left (a b^{2} n^{2} + a b^{2} n\right )} \cos \left (d x + c\right ) + {\left (b^{3} n^{2} + 3 \, b^{3} n + 2 \, b^{3} + 2 \, {\left (2 \, b^{3} - {\left (a^{2} b - b^{3}\right )} n\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )\right )} \left (\frac {a \cos \left (d x + c\right ) + b \sin \left (d x + c\right )}{\cos \left (d x + c\right )}\right )^{n}}{{\left (b^{3} d n^{3} + 6 \, b^{3} d n^{2} + 11 \, b^{3} d n + 6 \, b^{3} d\right )} \cos \left (d x + c\right )^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tan {\left (c + d x \right )}\right )^{n} \sec ^{4}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^n}{{\cos \left (c+d\,x\right )}^4} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________